$def with (error)
<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="账户登录">
    <meta name="author" content="jry">
    <title>账户登录</title>
    <script src="/static/js/jquery-1.11.1.min.js"></script>
    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script src="/static/bootstrap/js/bootstrap.min.js"></script>
    
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <style>
    	body {padding-top: 40px;padding-bottom: 40px;background-color: #eee;}
		.form-signin {max-width: 330px;padding: 15px;margin: 0 auto;}
		.form-signin-heading{text-align: center;}
		.form-signin .form-signin-heading,.form-signin .checkbox {margin-bottom: 10px;}
		.form-signin .checkbox {font-weight: normal;}
		.form-signin .form-control {position: relative;font-size: 16px;height: auto;padding: 10px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
		.form-signin .form-control:focus {z-index: 2;}
		.form-signin input[type="text"] {margin-bottom: -1px;border-bottom-left-radius: 0;border-bottom-right-radius: 0;}
		.form-signin input[type="password"] {margin-bottom: 10px;border-top-left-radius: 0;border-top-right-radius: 0;}
    </style>
    
  </head>
  <body>
    <div class="container">
         
      <form class="form-signin" role="form" action="/" method="post">
      	  $if error == "":
                $pass
            $else:
                <div class="alert alert-danger alert-dismissable">
                	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button><strong>错误!</strong>
                $error	
                </div>
        <h2 class="form-signin-heading">账户登录</h2>
        <input type="text" class="form-control" placeholder="用户名" name="user" required autofocus>
        <input type="password" class="form-control" placeholder="密码" name="passwd" required>
        <label class="checkbox">
          <input type="checkbox" value="remember-me"> 记住登录
        </label>
        <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
      </form>
      
    </div> <!-- /container -->

  </body>
</html>
